<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        function fun1(year){
            var money = 10000;
            for(var i = 2;i <=year;i++){
                money+=0.05*money
            }
            console.log(money)
        }
        fun1(50)


        function fun2(n){
            for(var i = 1;i<=n;i++){
                if(i%7===0){
                    console.log(i)
                }
            }
        }
        fun2(20)

        function fun3(a){
            var j = 1
            var sum = 0
            for(var i = 1;i<=a;i++){
                if(i%2){
                    sum += j/i
                }else{
                    sum += -j/i
                }
            }
            console.log(sum)
        }
        fun3(100)

        function fun4(){
            for(var b = 100;b<=200;b++){
                if(b%3===0||b%7===0){
                    console.log(b)
                }
            }
        }
        fun4()

        function fun5(h){
            for(var c = 1;c<=h;c++){
                for(var d = 1;d<=c;d++){
                    document.write(d+"&times;"+c+"="+d*c+"&nbsp;&nbsp;&nbsp;")
                }
                document.write("<br>")
                document.write("<br>")
            }
        }
        fun5(6)



        function fun6(){
            for(var i = 1;i<5;i++){
                for(var m = 4;m>=i;m--){
                    document.write("&nbsp;")
                }
                for(var j = 1;j<=i+1;j+=0.5){
                document.write("*")
                }
                document.write("<br>")
            }
            for(var i = 1;i<4;i++){
                for(var m = 5;m>=1;m--){
                    document.write("&nbsp;")
                }
                for(var j = 1;j<=3;j++){
                document.write("*")
                }
                document.write("<br>")
            }
        }
        fun6()



        function fun7(i){
            var sum = 0
            for(var j=0;j<i;j++){
                sum+=2**j*0.00001
            }
            console.log(sum)

        }
        fun7(30)
    </script>
    
</body>
</html>